package model

type SysUser struct {
	ID       int    `json:"id"`
	Username string `json:"username"`
	Password string `json:"password"`
	Avatar   string `json:"avatar"`
	Email    string `json:"email"`
	Phone    string `json:"phone"`
	Address  string `json:"address"`
	Gender   string `json:"gender"`
	Birthday string `json:"birthday"`
	BaseModel
}

// GetUserByID /**
func GetUserByID(id int) (*SysUser, error) {
	var user SysUser
	err := DB.Where("id = ?", id).First(&user).Error
	return &user, err
}
